<?php
if(!isset($_SESSION))
	session_start();
//set language
@$language = !empty($_GET["lang"]) ? strip_tags($_GET["lang"]) : $_SESSION["lang2"];
$def_lang = "vi";
if($language == "en"){
	$_SESSION["lang2"] = "en";	
}else{
	$language = $def_lang;
	$_SESSION["lang2"] = $def_lang;
	
}
@$language = $_SESSION["lang2"];

$dir = realpath(realpath(dirname(__FILE__)) . "/../") . "/";
include $dir . "/function.php";
include $dir . "/admin/lang/{$language}.php";
include($dir . "setting.php");

if (!isset($_SESSION['my_admin_id']) or empty($_SESSION['my_admin_id'])) {
	header("Location: " . base_index_admin);
	exit();
}

session_cache_limiter('private, must-revalidate');

$product_path_dir = $dir . "upload/product/";
$product_path_link = base . "common/upload/product/";

$langDB = ucfirst($language);

//add arr form

$sessionID = $_SESSION["my_admin_id"];
$sessionType = single_select("admin_user", "userType", "`userID` = '$sessionID'");

?>